package com.example.master.controller;

import com.example.master.entity.*;
import com.example.master.entity.Subject;
import com.example.master.service.*;
import com.example.master.utils.*;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.web.bind.annotation.*;

import javax.security.auth.*;
import java.util.*;

/**
 * @Author Mr.Yuan
 * @Date 2023/2/6 15:22
 * @PackageName:com.example.master.controller
 * @ClassName: SubjectController
 * @Description: TODO
 * @Version 1.0
 */
@CrossOrigin
@RestController
@RequestMapping("/subject")
@Api(tags = "服务列表", value = "服务Open api 入口")
public class SubjectController {

    @Autowired
    private SubjectServices subjectServices;

    @GetMapping
    @ApiOperation(value = "服务分类列表", response = Subject.class)
    public Result subject() {
        Result result = subjectServices.findAll();
        return result;
    }

}
